programming4us
           
 
 
Windows

Windows 7 : Checking Your Hard Disk for Errors

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
11/25/2010 4:20:58 PM
Our hard disks store our programs and, most important, our precious data, so they have a special place in the computing firmament. They ought to be pampered and coddled to ensure a long and trouble-free existence, but that’s rarely the case, unfortunately. Just consider everything that a modern hard disk has to put up with:
  • General wear and tear— If your computer is running right now, its hard disk is spinning away at probably 7,200 revolutions per minute. That’s right, even though you’re not doing anything, the hard disk is hard at work. Because of this constant activity, most hard disks simply wear out after a few years.

    Note

    I should say that your hard disk is probably spinning away as I speak. Windows 7 is actually configured out of the box to put your hard disk to sleep after 20 minutes of inactivity, so your hard disk may be resting. If you want to change the hard disk sleep interval (personally, I turn it off on my machines to improve performance), select Start, type power, and then click Change Power-Saving Options in the search results. Select the power plan you want to use, click Change Plan Settings, and then click Change Advanced Power Settings, Open the Hard Disk branch, open the Turn Off Hard Disk After branch, and then set the interval you prefer.


  • The old bump-and-grind— Your hard disk includes read/write heads that are used to read data from and write data to the disk. These heads float on a cushion of air just above the spinning hard disk platters. A bump or jolt of sufficient intensity can send them crashing onto the surface of the disk, which could easily result in trashed data. If the heads happen to hit a particularly sensitive area, the entire hard disk could crash. Notebook computers are particularly prone to this problem.

  • Power surges— The current supplied to your PC is, under normal conditions, relatively constant. It’s possible, however, for massive power surges to assail your computer (for example, during a lightning storm). These surges can wreak havoc on a carefully arranged hard disk.

So, what can you do about it? Windows 7 comes with a program called Check Disk that can check your hard disk for problems and repair them automatically. It might not be able to recover a totally trashed hard disk, but it can at least let you know when a hard disk might be heading for trouble.

Check Disk performs a battery of tests on a hard disk, including looking for invalid filenames, invalid file dates and times, bad sectors, and invalid compression structures. In the hard disk’s file system, Check Disk also looks for the following errors:

  • Lost clusters

  • Invalid clusters

  • Cross-linked clusters

  • File system cycles

The next few sections explain these errors in more detail.

Understanding Clusters

Large hard disks are inherently inefficient. Formatting a disk divides the disk’s magnetic medium into small storage areas called sectors, which usually hold up to 512 bytes of data. A large hard disk can contain tens of millions of sectors, so it would be too inefficient for Windows 7 to deal with individual sectors. Instead, Windows 7 groups sectors into clusters, the size of which depends on the file system and the size of the partition, as shown in Table 1.

Table 1. Default Cluster Sizes for Various File Systems and Partition Sizes
Partition SizeFAT16 Cluster SizeFAT32 Cluster SizeNTFS Cluster Size
7MB–16MB2KBN/A512 bytes
17MB–32MB512 bytesN/A512 bytes
33MB–64MB1KB512 bytes512 bytes
65MB–128MB2KB1KB512 bytes
129MB–256MB4KB2KB512 bytes
257MB–512MB8KB4KB512 bytes
513MB–1,024MB16KB4KB1KB
1025MB–2GB32KB4KB2KB
2GB–4GB64KB4KB4KB
4GB–8GBN/A4KB4KB
8GB–16GBN/A8KB4KB
16GB–32GBN/A16KB4KB
32GB–2TBN/AN/A4KB

Still, each hard disk has many thousands of clusters, so it’s the job of the file system to keep track of everything. In particular, for each file on the disk, the file system maintains an entry in a file directory, a sort of table of contents for your files. (On an NTFS partition, this is the Master File Table, or MFT.)

Understanding Lost Clusters

A lost cluster (also sometimes called an orphaned cluster) is a cluster that, according to the file system, is associated with a file, but that has no link to any entry in the file directory. Program crashes, power surges, or power outages are some typical causes of lost clusters.

If Check Disk comes across lost clusters, it offers to convert them to files in either the file’s original folder (if Check Disk can determine the proper folder) or in a new folder named Folder.000 in the root of the %SystemDrive%. (If that folder already exists, Check Disk creates a new folder named Folder.001 instead.) In that folder, Check Disk converts the lost clusters to files with names such as File0000.chk and File0001.chk.

You can look at these files (using a text editor) to see whether they contain any useful data and then try to salvage it. Most often, however, these files are unusable and most people just delete them.

Understanding Invalid Clusters

An invalid cluster is one that falls under one of the following three categories:

  • A file system entry with an illegal value. (In the FAT16 file system, for example, an entry that refers to cluster 1 is illegal because a disk’s cluster numbers start at 2.)

  • A file system entry that refers to a cluster number larger than the total number of clusters on the disk.

  • A file system entry that is marked as unused, but is part of a cluster chain.

In this case, Check Disk asks whether you want to convert these lost file fragments to files. If you say yes, Check Disk truncates the file by replacing the invalid cluster with an EOF (end of file) marker and then converts the lost file fragments to files. These are probably the truncated portion of the file, so you can examine them and try to piece everything back together. More likely, however, you just have to trash these files.

Understanding Cross-Linked Clusters

A cross-linked cluster is a cluster assigned to two different files (or twice in the same file). Check Disk offers to delete the affected files, copy the cross-linked cluster to each affected file, or ignore the cross-linked files altogether. In most cases, the safest bet is to copy the cross-linked cluster to each affected file. That way, at least one of the affected files should be usable.

Understanding Cycles

In an NTFS partition, a cycle is a corruption in the file system whereby a subfolder’s parent folder is listed as the subfolder itself. For example, a folder named C:\Data should have C:\ as its parent; if C:\Data is a cycle, C:\Data—the same folder—is listed as the parent instead. This creates a kind of loop in the file system that can cause the cycled folder to “disappear.”

Running the Check Disk GUI

Check Disk has two versions: a GUI version and a command-line version. See the next section to learn how to use the command-line version. Here are the steps to follow to run the GUI version of Check Disk:

1.
Select Start, Computer, right-click the drive you want to check, and then click Properties. The drive’s property sheet appears.

2.
Display the Tools tab.

3.
Click the Check Now button. The Check Disk window appears, as shown in Figure 1.

Figure 1. Use Check Disk to scan a hard disk partition for errors.


4.
Activate one or both of the following options, if desired:

  • Automatically Fix File System Errors— If you activate this check box, Check Disk automatically repairs any file system errors that it finds. If you leave this option deactivated, Check Disk just reports on any errors it finds.

  • Scan for and Attempt Recovery of Bad Sectors— If you activate this check box, Check Disk performs a sector-by-sector surface check of the hard disk surface. If Check Disk finds a bad sector, it automatically attempts to recover any information stored in the sector and it marks the sector as defective so that no information can be stored there in the future.

5.
Click Start.

6.
If you activated the Automatically Fix File System Errors check box and are checking a partition that has open system files, Check Disk will tell you that it can’t continue because it requires exclusive access to the disk. It will then ask whether you want to schedule the scan to occur the next time you boot the computer. Click Schedule Disk Check.

7.
When the scan is complete, Check Disk displays a message letting you know and a report on the errors it found, if any.

The AUTOCHK Utility

If you click Schedule Disk Check when Check Disk asks whether you want to schedule the scan for the next boot, the program adds the AUTOCHK utility to the following Registry setting:

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\BootExecute

This setting specifies the programs that Windows 7 should run at boot time when the Session Manager is loading. AUTOCHK is the automatic version of Check Disk that runs at system startup. If you want the option of skipping the disk check, you need to specify a timeout value for AUTOCHK. You change the timeout value by adding the AutoChkTimeOut setting as a DWORD value in the same Registry key:

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\

Set this to the number of seconds that you want to use for the timeout. Another way to set the timeout value is to use the CHKNTFS /T:[time] command, where time is the number of seconds to use for the timeout. (If you exclude time, CHKNTFS returns the current timeout setting.) For example, the following command sets the timeout to 60 seconds:

CHKNTFS /T:60

When AUTOCHK is scheduled with a timeout value greater than 0, you see the following the next time you restart the computer:

A disk check has been scheduled.

To skip disk checking, press any key within 60 second(s).

You can bypass the check by pressing a key before the timeout expires.

Other -----------------
- Windows Azure : Understanding Message Operations
- Windows Azure : Understanding Queue Operations
- Windows Azure Queue Overview
- Tuning Windows 7’s Performance : Optimizing Virtual Memory
- Tuning Windows 7’s Performance : Optimizing the Hard Disk
- Tuning Windows 7’s Performance : Optimizing Applications
- Tuning Windows 7’s Performance : Optimizing Startup
- Tuning Windows 7’s Performance : Monitoring Performance
- Windows Vista - File Encryption : Workings of BitLocker Drive Encryption
- Windows Vista - File Encryption : Encryption File System
- Windows 7 : Customizing the Taskbar for Easier Program and Document Launching
- Windows 7 : Customizing the Start Menu for Easier Program and Document Launching
- Windows Azure Storage : REST API (part 2) - Storage Client APIs
- Windows Azure Storage : REST API (part 1)
- Windows 7 : Customizing Your Notebook’s Power and Sleep Buttons
- Windows 7 : Customizing the Start Menu’s Power Button
- Windows 7 : Turning Off Your Windows 7 Computer from Anywhere
- Windows 7 : Setting Up One-Click Restarts and Shutdowns
- Windows 7 : Useful Windows 7 Logon Strategies
- Windows 7 : Customizing Startups with the Advanced Options Menu
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us